﻿<UserControl x:Class="P2.Cuberry.Modules.SimpleSCM.SCSupplierInvoice.SCSupplierInvoicesListView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    >

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/P2.Cuberry.Framework.Layout;component/Styles/Styles.xaml"/>
                <ResourceDictionary Source="/P2.Cuberry.Framework.Layout;component/Styles/CuberryDataGrid.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    
    
    <Grid VerticalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" MinHeight="44" />
            
 
        </Grid.RowDefinitions>

        <DataGrid  Grid.Row ="0" ItemsSource="{Binding Model}" 
                      Name="SCSupplierInvoicesList"
                      SelectionChanged="SCSupplierInvoicesList_SelectionChanged" 
                      MouseDoubleClick="SCSupplierInvoicesList_DblClick" 
                      Style="{DynamicResource CuberryDataGridStyle}"
                      VerticalAlignment="Stretch" >
            
            
            <DataGrid.Columns>
                <DataGridTextColumn Header="{Translate SCSupplierInvoiceHeaderIDL}" Binding="{Binding Path=SCSupplierInvoiceHeaderID}" MinWidth="50" Width="85"/>
                <DataGridTextColumn Header="{Translate SupplierInvoiceNoL}" Binding="{Binding Path=SupplierInvoiceNo}" MinWidth="50" Width="85"/>                                
                <DataGridTextColumn Header="{Translate SupplierReceiptDateL}" Binding="{Binding Path=SupplierReceiptDate, StringFormat=dd/MM/yyyy}" MinWidth="50" Width="100"/>
                <DataGridTextColumn Header="{Translate BookingDate}" Binding="{Binding Path=BookingDate, StringFormat=dd/MM/yyyy}" MinWidth="100" Width="150"/>
                <DataGridTextColumn Header="{Translate SupplierL}" Binding="{Binding Path=SupplierNameCur}" MinWidth="100" Width="150"/>
                <DataGridTextColumn Header="{Translate DocumentNoHeaderL}" Binding="{Binding Path=DocumentNo}" MinWidth="100" Width="150"/>
                <DataGridTextColumn Header="{Translate TotalAmountL}" Binding="{Binding Path=TotalAmount}" />
                <DataGridTextColumn Header="{Translate FiscalYearIDL}" Binding="{Binding FiscalYear.FiscalYearName}" MinWidth="50" Width="100"/>
                <DataGridTextColumn Header="{Translate StatusIDL}" Binding="{Binding Path=StatusName}"  MinWidth="50" Width="*"/>
            </DataGrid.Columns>
        </DataGrid>
    
</Grid>
</UserControl>
